<template>
  <div v-if="spinning" class="example" :style="{'top': top}">
    <p-spin />
  </div>
</template>
<script>
export default {
  props: {
    top: {
      type: String,
      default: '20%'
    },
    spinning: {
      type: Boolean,
      default: false
    } 
  },
}
</script>
<style lang="less" scoped>
.example {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  background: #fff;
  z-index: 1001;
  opacity: 0.8;
}
</style>

